package com.yuanfeng.activity.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 红包模版表
 * @TableName activity_redpacket_template
 */
@TableName(value ="activity_redpacket_template")
@Data
public class ActivityRedpacketTemplateEntity implements Serializable {
    /**
     * 红包模版编号
     */
    @TableId(type = IdType.AUTO)
    private Integer redpacketTId;

    /**
     * 红包类型，1-新人注册红包，2-普通红包，3-多品红包 4-店铺红包 5-单品多品红包 6-专属红包默认2
     */
    private Integer redpacketTType;

    /**
     * 红包模版名称
     */
    private String redpacketTTitle;

    /**
     * 红包模版描述
     */
    private String redpacketTDesc;

    /**
     * 红包模版有效期开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date redpacketTStartDate;

    /**
     * 红包模版有效期结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date redpacketTEndDate;

    /**
     * 红包模版面额
     */
    private Integer redpacketTPrice;

    /**
     * 红包使用店铺显示，默认为空，不限店铺使用，多个店铺ID之间用逗号分隔
     */
    private String shopLimit;

    /**
     * 红包使用商品分类限制，默认为空，不限分类，多个商品分类ID之间用逗号分隔
     */
    private String goodsCatLimit;

    /**
     * 红包使用时的消费限额
     */
    private BigDecimal redpacketTOrderlimit;

    /**
     * 红包是否允许转增，1-是，0-否，默认0
     */
    private Integer isAllowTransfer;

    /**
     * 红包模版状态(1-有效,2-失效,3-删除)
     */
    private Byte redpacketTState;

    /**
     * 模版可发放的红包总数  0 不限制
     */
    private Integer redpacketTTotal;

    /**
     * 模版已发放的红包数量
     */
    private Integer redpacketTGiveout;

    /**
     * 模版已经使用过的红包
     */
    private Integer redpacketTUsed;

    /**
     * 模版的创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date redpacketTAddDate;

    /**
     * 模版的最后修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date redpacketTUpdateDate;

    /**
     * 兑换所需积分
     */
    private Integer redpacketTPoints;

    /**
     * 每人限领张数 0 不限制
     */
    private Integer redpacketTEachlimit;

    /**
     * 领取红包的用户等级限制
     */
    private Byte redpacketTUserGradeLimit;

    /**
     * 红包图片
     */
    private String redpacketTImg;

    /**
     * 红包领取方式，1-积分兑换(默认)，2-卡密兑换，3-免费领取
     */
    private Integer redpacketTAccessMethod;

    /**
     * 推荐状态，0-为不推荐，1-推荐
     */
    private Integer redpacketTRecommend;

    /**
     * 红包使用端口 0无限制  1PC 2wap 3安卓 5ios 6微信小程序 7wap浏览器
     */
    private String redpacketUsePlatform;

    /**
     * 红包领用端口 0无限制  1PC 2wap 3安卓 5ios 6微信小程序 7wap浏览器
     */
    private String redpacketGetPlatform;

    /**
     * 多品红包类型：1多品配置2专区
     */
    private Integer manyRedpacketType;

    /**
     * 多品红包跳转类型3:链接;12:为你推荐13:特产推荐;14:新品推荐;19:新人专区;20:平台活动专区;21:9.9包邮专区;22:品牌生活;23:好货溯源;24:蜂狂特价;25:猜你喜欢;26:时令果蔬;27:节日钜惠;28:限时折扣;29:超级拼团;34:多品红包列表
     */
    private Integer actionType;

    /**
     * 多品红包跳转地址
     */
    private String manyRedpacketSkipUrl;

    /**
     * 操作人
     */
    private String orderOperator;

    /**
     * 操作时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date orderOperatorTime;

    /**
     * 跳转名称
     */
    private String actionName;

    /**
     * 审批
     */
    private String redpacketRemark;

    /**
     * 前端是否显示1显示2不显示
     */
    private Byte frontEndIsDisplay;

    /**
     * 红包是否倒计时1-否2-是
     */
    private Byte redpacketIsBooking;

    /**
     * 抢红包开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date robRedpacketStartDate;

    /**
     * 抢红包结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date robRedpacketEndDate;

    /**
     * 自红包发放起，有效天数
     */
    private Integer redTermofvalidity;

    @TableField(exist = false)
    private List<String> usePlatformStringList;

    @TableField(exist = false)
    private List<String> GetPlatformStringList;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ActivityRedpacketTemplateEntity other = (ActivityRedpacketTemplateEntity) that;
        return (this.getRedpacketTId() == null ? other.getRedpacketTId() == null : this.getRedpacketTId().equals(other.getRedpacketTId()))
            && (this.getRedpacketTType() == null ? other.getRedpacketTType() == null : this.getRedpacketTType().equals(other.getRedpacketTType()))
            && (this.getRedpacketTTitle() == null ? other.getRedpacketTTitle() == null : this.getRedpacketTTitle().equals(other.getRedpacketTTitle()))
            && (this.getRedpacketTDesc() == null ? other.getRedpacketTDesc() == null : this.getRedpacketTDesc().equals(other.getRedpacketTDesc()))
            && (this.getRedpacketTStartDate() == null ? other.getRedpacketTStartDate() == null : this.getRedpacketTStartDate().equals(other.getRedpacketTStartDate()))
            && (this.getRedpacketTEndDate() == null ? other.getRedpacketTEndDate() == null : this.getRedpacketTEndDate().equals(other.getRedpacketTEndDate()))
            && (this.getRedpacketTPrice() == null ? other.getRedpacketTPrice() == null : this.getRedpacketTPrice().equals(other.getRedpacketTPrice()))
            && (this.getShopLimit() == null ? other.getShopLimit() == null : this.getShopLimit().equals(other.getShopLimit()))
            && (this.getGoodsCatLimit() == null ? other.getGoodsCatLimit() == null : this.getGoodsCatLimit().equals(other.getGoodsCatLimit()))
            && (this.getRedpacketTOrderlimit() == null ? other.getRedpacketTOrderlimit() == null : this.getRedpacketTOrderlimit().equals(other.getRedpacketTOrderlimit()))
            && (this.getIsAllowTransfer() == null ? other.getIsAllowTransfer() == null : this.getIsAllowTransfer().equals(other.getIsAllowTransfer()))
            && (this.getRedpacketTState() == null ? other.getRedpacketTState() == null : this.getRedpacketTState().equals(other.getRedpacketTState()))
            && (this.getRedpacketTTotal() == null ? other.getRedpacketTTotal() == null : this.getRedpacketTTotal().equals(other.getRedpacketTTotal()))
            && (this.getRedpacketTGiveout() == null ? other.getRedpacketTGiveout() == null : this.getRedpacketTGiveout().equals(other.getRedpacketTGiveout()))
            && (this.getRedpacketTUsed() == null ? other.getRedpacketTUsed() == null : this.getRedpacketTUsed().equals(other.getRedpacketTUsed()))
            && (this.getRedpacketTAddDate() == null ? other.getRedpacketTAddDate() == null : this.getRedpacketTAddDate().equals(other.getRedpacketTAddDate()))
            && (this.getRedpacketTUpdateDate() == null ? other.getRedpacketTUpdateDate() == null : this.getRedpacketTUpdateDate().equals(other.getRedpacketTUpdateDate()))
            && (this.getRedpacketTPoints() == null ? other.getRedpacketTPoints() == null : this.getRedpacketTPoints().equals(other.getRedpacketTPoints()))
            && (this.getRedpacketTEachlimit() == null ? other.getRedpacketTEachlimit() == null : this.getRedpacketTEachlimit().equals(other.getRedpacketTEachlimit()))
            && (this.getRedpacketTUserGradeLimit() == null ? other.getRedpacketTUserGradeLimit() == null : this.getRedpacketTUserGradeLimit().equals(other.getRedpacketTUserGradeLimit()))
            && (this.getRedpacketTImg() == null ? other.getRedpacketTImg() == null : this.getRedpacketTImg().equals(other.getRedpacketTImg()))
            && (this.getRedpacketTAccessMethod() == null ? other.getRedpacketTAccessMethod() == null : this.getRedpacketTAccessMethod().equals(other.getRedpacketTAccessMethod()))
            && (this.getRedpacketTRecommend() == null ? other.getRedpacketTRecommend() == null : this.getRedpacketTRecommend().equals(other.getRedpacketTRecommend()))
            && (this.getRedpacketUsePlatform() == null ? other.getRedpacketUsePlatform() == null : this.getRedpacketUsePlatform().equals(other.getRedpacketUsePlatform()))
            && (this.getRedpacketGetPlatform() == null ? other.getRedpacketGetPlatform() == null : this.getRedpacketGetPlatform().equals(other.getRedpacketGetPlatform()))
            && (this.getManyRedpacketType() == null ? other.getManyRedpacketType() == null : this.getManyRedpacketType().equals(other.getManyRedpacketType()))
            && (this.getActionType() == null ? other.getActionType() == null : this.getActionType().equals(other.getActionType()))
            && (this.getManyRedpacketSkipUrl() == null ? other.getManyRedpacketSkipUrl() == null : this.getManyRedpacketSkipUrl().equals(other.getManyRedpacketSkipUrl()))
            && (this.getOrderOperator() == null ? other.getOrderOperator() == null : this.getOrderOperator().equals(other.getOrderOperator()))
            && (this.getOrderOperatorTime() == null ? other.getOrderOperatorTime() == null : this.getOrderOperatorTime().equals(other.getOrderOperatorTime()))
            && (this.getActionName() == null ? other.getActionName() == null : this.getActionName().equals(other.getActionName()))
            && (this.getRedpacketRemark() == null ? other.getRedpacketRemark() == null : this.getRedpacketRemark().equals(other.getRedpacketRemark()))
            && (this.getFrontEndIsDisplay() == null ? other.getFrontEndIsDisplay() == null : this.getFrontEndIsDisplay().equals(other.getFrontEndIsDisplay()))
            && (this.getRedpacketIsBooking() == null ? other.getRedpacketIsBooking() == null : this.getRedpacketIsBooking().equals(other.getRedpacketIsBooking()))
            && (this.getRobRedpacketStartDate() == null ? other.getRobRedpacketStartDate() == null : this.getRobRedpacketStartDate().equals(other.getRobRedpacketStartDate()))
            && (this.getRobRedpacketEndDate() == null ? other.getRobRedpacketEndDate() == null : this.getRobRedpacketEndDate().equals(other.getRobRedpacketEndDate()))
            && (this.getRedTermofvalidity() == null ? other.getRedTermofvalidity() == null : this.getRedTermofvalidity().equals(other.getRedTermofvalidity()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getRedpacketTId() == null) ? 0 : getRedpacketTId().hashCode());
        result = prime * result + ((getRedpacketTType() == null) ? 0 : getRedpacketTType().hashCode());
        result = prime * result + ((getRedpacketTTitle() == null) ? 0 : getRedpacketTTitle().hashCode());
        result = prime * result + ((getRedpacketTDesc() == null) ? 0 : getRedpacketTDesc().hashCode());
        result = prime * result + ((getRedpacketTStartDate() == null) ? 0 : getRedpacketTStartDate().hashCode());
        result = prime * result + ((getRedpacketTEndDate() == null) ? 0 : getRedpacketTEndDate().hashCode());
        result = prime * result + ((getRedpacketTPrice() == null) ? 0 : getRedpacketTPrice().hashCode());
        result = prime * result + ((getShopLimit() == null) ? 0 : getShopLimit().hashCode());
        result = prime * result + ((getGoodsCatLimit() == null) ? 0 : getGoodsCatLimit().hashCode());
        result = prime * result + ((getRedpacketTOrderlimit() == null) ? 0 : getRedpacketTOrderlimit().hashCode());
        result = prime * result + ((getIsAllowTransfer() == null) ? 0 : getIsAllowTransfer().hashCode());
        result = prime * result + ((getRedpacketTState() == null) ? 0 : getRedpacketTState().hashCode());
        result = prime * result + ((getRedpacketTTotal() == null) ? 0 : getRedpacketTTotal().hashCode());
        result = prime * result + ((getRedpacketTGiveout() == null) ? 0 : getRedpacketTGiveout().hashCode());
        result = prime * result + ((getRedpacketTUsed() == null) ? 0 : getRedpacketTUsed().hashCode());
        result = prime * result + ((getRedpacketTAddDate() == null) ? 0 : getRedpacketTAddDate().hashCode());
        result = prime * result + ((getRedpacketTUpdateDate() == null) ? 0 : getRedpacketTUpdateDate().hashCode());
        result = prime * result + ((getRedpacketTPoints() == null) ? 0 : getRedpacketTPoints().hashCode());
        result = prime * result + ((getRedpacketTEachlimit() == null) ? 0 : getRedpacketTEachlimit().hashCode());
        result = prime * result + ((getRedpacketTUserGradeLimit() == null) ? 0 : getRedpacketTUserGradeLimit().hashCode());
        result = prime * result + ((getRedpacketTImg() == null) ? 0 : getRedpacketTImg().hashCode());
        result = prime * result + ((getRedpacketTAccessMethod() == null) ? 0 : getRedpacketTAccessMethod().hashCode());
        result = prime * result + ((getRedpacketTRecommend() == null) ? 0 : getRedpacketTRecommend().hashCode());
        result = prime * result + ((getRedpacketUsePlatform() == null) ? 0 : getRedpacketUsePlatform().hashCode());
        result = prime * result + ((getRedpacketGetPlatform() == null) ? 0 : getRedpacketGetPlatform().hashCode());
        result = prime * result + ((getManyRedpacketType() == null) ? 0 : getManyRedpacketType().hashCode());
        result = prime * result + ((getActionType() == null) ? 0 : getActionType().hashCode());
        result = prime * result + ((getManyRedpacketSkipUrl() == null) ? 0 : getManyRedpacketSkipUrl().hashCode());
        result = prime * result + ((getOrderOperator() == null) ? 0 : getOrderOperator().hashCode());
        result = prime * result + ((getOrderOperatorTime() == null) ? 0 : getOrderOperatorTime().hashCode());
        result = prime * result + ((getActionName() == null) ? 0 : getActionName().hashCode());
        result = prime * result + ((getRedpacketRemark() == null) ? 0 : getRedpacketRemark().hashCode());
        result = prime * result + ((getFrontEndIsDisplay() == null) ? 0 : getFrontEndIsDisplay().hashCode());
        result = prime * result + ((getRedpacketIsBooking() == null) ? 0 : getRedpacketIsBooking().hashCode());
        result = prime * result + ((getRobRedpacketStartDate() == null) ? 0 : getRobRedpacketStartDate().hashCode());
        result = prime * result + ((getRobRedpacketEndDate() == null) ? 0 : getRobRedpacketEndDate().hashCode());
        result = prime * result + ((getRedTermofvalidity() == null) ? 0 : getRedTermofvalidity().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", redpacketTId=").append(redpacketTId);
        sb.append(", redpacketTType=").append(redpacketTType);
        sb.append(", redpacketTTitle=").append(redpacketTTitle);
        sb.append(", redpacketTDesc=").append(redpacketTDesc);
        sb.append(", redpacketTStartDate=").append(redpacketTStartDate);
        sb.append(", redpacketTEndDate=").append(redpacketTEndDate);
        sb.append(", redpacketTPrice=").append(redpacketTPrice);
        sb.append(", shopLimit=").append(shopLimit);
        sb.append(", goodsCatLimit=").append(goodsCatLimit);
        sb.append(", redpacketTOrderlimit=").append(redpacketTOrderlimit);
        sb.append(", isAllowTransfer=").append(isAllowTransfer);
        sb.append(", redpacketTState=").append(redpacketTState);
        sb.append(", redpacketTTotal=").append(redpacketTTotal);
        sb.append(", redpacketTGiveout=").append(redpacketTGiveout);
        sb.append(", redpacketTUsed=").append(redpacketTUsed);
        sb.append(", redpacketTAddDate=").append(redpacketTAddDate);
        sb.append(", redpacketTUpdateDate=").append(redpacketTUpdateDate);
        sb.append(", redpacketTPoints=").append(redpacketTPoints);
        sb.append(", redpacketTEachlimit=").append(redpacketTEachlimit);
        sb.append(", redpacketTUserGradeLimit=").append(redpacketTUserGradeLimit);
        sb.append(", redpacketTImg=").append(redpacketTImg);
        sb.append(", redpacketTAccessMethod=").append(redpacketTAccessMethod);
        sb.append(", redpacketTRecommend=").append(redpacketTRecommend);
        sb.append(", redpacketUsePlatform=").append(redpacketUsePlatform);
        sb.append(", redpacketGetPlatform=").append(redpacketGetPlatform);
        sb.append(", manyRedpacketType=").append(manyRedpacketType);
        sb.append(", actionType=").append(actionType);
        sb.append(", manyRedpacketSkipUrl=").append(manyRedpacketSkipUrl);
        sb.append(", orderOperator=").append(orderOperator);
        sb.append(", orderOperatorTime=").append(orderOperatorTime);
        sb.append(", actionName=").append(actionName);
        sb.append(", redpacketRemark=").append(redpacketRemark);
        sb.append(", frontEndIsDisplay=").append(frontEndIsDisplay);
        sb.append(", redpacketIsBooking=").append(redpacketIsBooking);
        sb.append(", robRedpacketStartDate=").append(robRedpacketStartDate);
        sb.append(", robRedpacketEndDate=").append(robRedpacketEndDate);
        sb.append(", redTermofvalidity=").append(redTermofvalidity);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }


}